<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let a = {}
    let b = {}
    let c = 123
    Object.defineProperty(b, 'c', {
      get() {
        console.log('get b.c')
        return c
      },
      set(value) {
        console.log('set b.c')
        c = value
      }
    })
    Object.defineProperty(a, 'b', {
      get() {
        console.log('get a.b')
        return b
      }
    })

    a.b.c = 456 // 先【get a.b】，再【set b.c】
  </script>
</body>
</html>